import { Icon } from '@iconify/vue/dist/iconify.js'
import type { RouteRecordRaw } from 'vue-router'

export const asyncRoutes: RouteRecordRaw[] = [
  // {
  //   path: '/',
  //   component: () => import('@/views/Layout/index.vue'),
  //   redirect: '/Article/ArticleManage',
  //   meta: {
  //     title: '首页',
  //     icon: () => h(Home),
  //     hidden: true,
  //   },
  //   children: [
  //     {
  //       path: 'home',
  //       name: 'Home',
  //       meta: {
  //         title: '首页',
  //         icon: () => h(Icon, { icon: 'solar:home-outline' }),
  //       },
  //       component: () => import('@/views/Home/index.vue'),
  //     },
  //   ],
  // },
  // {
  //   path: '/System',
  //   name: 'System',
  //   meta: {
  //     title: '系统管理',
  //     icon: () => h(Icon, { icon: 'carbon:ibm-engineering-systems-design-rhapsody-model-manager' }),
  //   },
  //   redirect: '/System/PermissionManage',
  //   component: () => import('@/views/Layout/index.vue'),
  //   children: [
  //     {
  //       path: 'PermissionManage',
  //       name: 'PermissionManage',
  //       meta: {
  //         title: '权限管理',
  //         icon: () => h(Icon, { icon: 'fluent-mdl2:permissions' }),
  //         roles: ['SUPER_ADMIN'],
  //       },
  //       component: () => import('@/views/System/PermissionManage.vue'),
  //     },
  //     {
  //       path: 'RoleManage',
  //       name: 'RoleManage',
  //       meta: {
  //         title: '角色管理',
  //         icon: () => h(Icon, { icon: 'oui:app-users-roles' }),
  //         roles: ['ADMIN', 'SUPER_ADMIN'],
  //       },
  //       component: () => import('@/views/System/RoleManage.vue'),
  //     },
  //     {
  //       path: 'UserManage',
  //       name: 'UserManage',
  //       meta: {
  //         title: '用户管理',
  //         icon: () => h(Icon, { icon: 'solar:user-id-broken' }),
  //         roles: ['ADMIN', 'SUPER_ADMIN'],
  //       },
  //       component: () => import('@/views/System/UserManage.vue'),
  //     },
  //   ],
  // },
  // {
  //   path: '/Article',
  //   name: 'Article',
  //   meta: {
  //     title: '文章模块',
  //     icon: () => h(Icon, { icon: 'hugeicons:book-edit' }),
  //   },
  //   redirect: '/Article/ArticleManage',
  //   component: () => import('@/views/Layout/index.vue'),
  //   children: [
  //     {
  //       path: 'ArticleManage',
  //       name: 'ArticleManage',
  //       meta: {
  //         title: '文章管理',
  //         icon: () => h(Icon, { icon: 'stash:article-light' }),
  //       },
  //       component: () => import('@/views/Article/Content/ArticleManage.vue'),
  //     },
  //     {
  //       path: 'ArticlePublish',
  //       name: 'ArticlePublish',
  //       meta: {
  //         title: '文章发布',
  //         icon: () => h(Icon, { icon: 'arcticons:article-reader' }),
  //       },
  //       component: () => import('@/views/Article/Content/ArticlePublish.vue'),
  //     },
  //     {
  //       path: 'ArticleCategory',
  //       name: 'ArticleCategory',
  //       meta: {
  //         title: '文章分类',
  //         roles: ['ADMIN', 'SUPER_ADMIN'],
  //         icon: () => h(Icon, { icon: 'dashicons:category' }),
  //       },
  //       component: () => import('@/views/Article/Category/index.vue'),
  //     },
  //     {
  //       path: 'ArticleTag',
  //       name: 'ArticleTag',
  //       meta: {
  //         title: '文章标签',
  //         roles: ['ADMIN', 'SUPER_ADMIN'],
  //         icon: () => h(Icon, { icon: 'emojione-monotone:label' }),
  //       },
  //       component: () => import('@/views/Article/Label/index.vue'),
  //     },
  //   ],
  // },
  // {
  //   path: '/User',
  //   name: 'User',
  //   meta: {
  //     title: '个人中心',
  //     hidden: true,
  //     icon: () => h(LogoGitlab),
  //   },
  //   redirect: '/User/UserManage',
  //   component: () => import('@/views/Layout/index.vue'),
  //   children: [
  //     {
  //       path: 'Info',
  //       name: 'UserInfo',
  //       meta: {
  //         title: '个人信息',
  //         hidden: true,
  //         icon: () => h(Icon, { icon: 'solar:home-outline' }),
  //       },
  //       component: () => import('@/views/User/info/index.vue'),
  //     },
  //   ],
  // },
  // {
  //   path:'/circle',
  //   name:'circle',
  //   meta:{
  //     title:'圈子模块',
  //     icon:()=>h(Icon,{icon:'solar:home-outline'})
  //   },
  //   component:()=>import('@/views/Layout/index.vue')
  //   ,
  //   children:[
  //     {
  //       path:'circleManage',
  //       name:'circleManage',
  //       meta:{
  //         title:'圈子管理',
  //         icon:()=>h(Icon,{icon:'solar:home-outline'})
  //       },
  //       component:()=>import('@/views/circle/index.vue')
  //     }
  //   ]
  // }
  {
    path: '/',
    name: '首页',
    component: () => import('@/views/Layout/index.vue'),
    redirect: '/home',
    meta: {
      title: '首页',
      icon: () => h(Icon, { icon: 'solar:home-outline' }),
    },
    children: [
      {
        path: 'home',
        name: 'Home',
        component: () => import('@/views/Home/index.vue'),
      },
    ],
  },
  {
    path: '/Article',
    name: 'Article',
    meta: {
      title: '文章模块',
      icon: () => h(Icon, { icon: 'hugeicons:book-edit' }),
    },
    redirect: '/Article/ArticleDetail',
    component: () => import('@/views/Layout/index.vue'),
    children: [
      {
        path: 'ArticleDetail',
        name: 'ArticleDetail',
        meta: {
          title: '文章详情',
          icon: () => h(Icon, { icon: 'stash:article-light' }),
        },
        component: () => import('@/views/Article/index.vue'),
     },
      {
        path: 'ArticleLiked',
        name: 'ArticleLiked',
        meta: {
          title: '点赞列表',
          icon: () => h(Icon, { icon: 'stash:article-light' }),
        },
        component: () => import('@/views/Article/LikedList.vue'),
      },

      {
        path: 'ArticleSearch',
        name: 'ArticleSearch',
        meta: {
          title: '搜索',
          icon: () => h(Icon, { icon: 'stash:article-light' }),
        },
        component: () => import('@/views/Article/Search.vue'),
      },
    ]
  },
]
